home *** CD-ROM | disk | FTP | other *** search
- Path: news.csl.sni.be!lukyluke
- From: David.Brabant@csl.sni.be (David Brabant [SNI])
- Newsgroups: comp.lang.c++,comp.os.ms-windows.programmer.misc
- Subject: Re: Using class members from DLL
- Date: Fri, 08 Mar 96 16:25:32 GMT
- Organization: Siemens Nixdorf
- Distribution: world
- Message-ID: <4hpj9i$bok@iliana.csl.sni.be>
- References: <313c67e1.4039445@news>
- NNTP-Posting-Host: lukyluke.csl.sni.be
- X-Newsreader: News Xpress Version 1.0 Beta #4
-
- >Using Microsoft Visual C++, version 1.5 I am looking a way to use a
- >class stored in a DLL. How can I get access to the members of a class
- >defined in a DLL from a program? Example:
- >
- >// This is in a DLL
- >class CTestList : public CListBox
- >{
- >public:
- > BOOL IsValid();
- >};
- >
- >// This is in a program
- >....
- > CTestList *test = new CTestList; // How to access the constructor
- > if (test->IsValid()) {
- > ...
- > }
- >
- >Now, the problem is that I can't get the compiler find the public
- >IsValid-member of the class. How do I export this 'function'? Do I
- >have to use a different prototyping of the class? How can I get this
- >working? I don't want to be writing C-code and use that as an
- >interface to the class...
- >
- >I hope this is clear enough. Help would be greatly appreciated.
- >
- >Bye, Bart.
- >P.S. If you can, please reply through emai.
-
- Use class __export Foo
- ^^^^^^^^
-
- This will export all your public members and you'll
- can access them from your executable.
-
- David
-
- --
- David Brabant, | E-mail: David.Brabant@csl.sni.be
- Siemens Nixdorf (SNI), | CIS: 100337,1733
- Centre Software de LiΦge, | X-400: C=BE;A=RTT;P=SCN;O=SNI;OU1=LGG1;OU2=S1
- 2, rue des Fories, | S=BRABANT;G=DAVID
- 4020 LiΦge (BELGIUM) | HTTP: www.sni.de www.csl.sni.be/~david
-